Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs(headless-ssr-commerce): log product view events #4833

Merged
merged 8 commits into from
Jan 15, 2025
Merged

Conversation

jpmarceau
Copy link
Contributor

@jpmarceau jpmarceau requested a review from a team as a code owner January 7, 2025 21:44
Copy link

github-actions bot commented Jan 7, 2025

Pull Request Report

PR Title

✅ Title follows the conventional commit spec.

Live demo links

Bundle Size

File Old (kb) New (kb) Change (%)
case-assist 243.8 243.8 0
commerce 355 355 0
search 414.9 414.9 0
insight 406.2 406.2 0
recommendation 256.1 256.1 0
ssr 408.4 408.4 0
ssr-commerce 372.4 372.4 0

SSR Progress

Use case SSR (#) CSR (#) Progress (%)
search 39 44 89
recommendation 0 4 0
case-assist 0 6 0
insight 0 27 0
commerce 0 15 0
Detailed logs search : buildInteractiveResult
search : buildInteractiveInstantResult
search : buildInteractiveRecentResult
search : buildInteractiveCitation
search : buildGeneratedAnswer
recommendation : missing SSR support
case-assist : missing SSR support
insight : missing SSR support
commerce : missing SSR support

alexprudhomme
alexprudhomme previously approved these changes Jan 8, 2025
@alexprudhomme alexprudhomme self-requested a review January 8, 2025 01:26
Copy link
Contributor

@alexprudhomme alexprudhomme left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@alexprudhomme alexprudhomme self-requested a review January 8, 2025 01:27
@fbeaudoincoveo
Copy link
Contributor

fbeaudoincoveo commented Jan 14, 2025

@fbeaudoincoveo why is this part of the remix sample so different ?

0a24fe1#diff-b70c5c4a8823d5a74fd87ca4f08d3b469b56258a3ab3c8bcd3e929ef13cd3dd8

Ah, I realized while working the remix sample that because we were using a ref, a new view event was not getting logged if you were already on a product description page, searched for another product in the standalone search box, and clicked the instant product link to open it.

The same logic should probably apply in the Nextjs sample.

@jpmarceau
Copy link
Contributor Author

@fbeaudoincoveo why is this part of the remix sample so different ?
0a24fe1#diff-b70c5c4a8823d5a74fd87ca4f08d3b469b56258a3ab3c8bcd3e929ef13cd3dd8

Ah, I realized while working the remix sample that because we were using a ref, a new view event was not getting logged if you were already on a product description page, searched for another product in the standalone search box, and clicked the instant product link to open it.

The same logic should probably apply in the Nextjs sample.

Thanks for the explanation. The bug didn't happen when I tried to replicate it in the Next.js sample, but I still carried over the changes for the sake of simplicity and uniformity 👍

@jpmarceau jpmarceau added this pull request to the merge queue Jan 15, 2025
Merged via the queue into master with commit 3153a4b Jan 15, 2025
95 checks passed
@jpmarceau jpmarceau deleted the KIT-3826 branch January 15, 2025 20:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants